<style scoped lang="less">
    @import "ResumeManage";
</style>
<template>
    <div class="resume-manage">
        <header-title :title="'简历管理'"></header-title>
        <div class="content">
            <ul class="tab-list">
                <li
                        v-for="(item, index) in tabList"
                        :key="index+'tab'"
                        class="tab-item"
                        :class="(currentTabName===index?'active':'')"
                        @click="currentTabName=index"
                >{{item.name}}（{{item.num}}）</li>
            </ul>
            <ul class="resume-list">
                <li v-for="(item, index) in talentList" :key="index+'tal'">
                    <el-checkbox class="check fl" v-model="item.checked" @change="checkItem"></el-checkbox>
                    <div class="avatar fl">
                        <img :src="item.avatar" alt="">
                    </div>
                    <div class="detail fl">
                        <div class="main-info">
                            <span class="info-name">{{item.name}}</span>
                            <img :src="item.detail.male==='男'?nanTag:nvTag" alt="">
                            <div class="info-most">
                                <span v-for="(infoItem, key) in item.detail" :key="key" class="most-item">
                                    {{infoItem}}
                                </span>
                            </div>
                        </div>
                        <div class="state">
                            <span class="state-item" v-for="(stateItem, key) in item.applyState" :key="key">
                                {{stateItem}}
                            </span>
                        </div>
                        <div class="tag">{{item.important}}</div>
                    </div>
                    <div class="collect fr">
                        <div class="collect-icon">
                            <div class="el-icon-star-on fl">收藏</div>
                            <div class="el-icon-delete btn fr"></div>
                        </div>
                        <el-button class="download" icon="el-icon-download">下载简历</el-button>
                        <div class="update"><i class="el-icon-time" style="margin-right: 7px"></i>2019-04-25</div>
                    </div>
                </li>
                <li>
                    <el-checkbox style="margin-right: 11px" v-model="checkedAll" @change="checkAll">
                        全选
                    </el-checkbox>
                    <span class="link batch-delete">删除所选</span>
                </li>
            </ul>
        </div>
        <div class="footer">
            <el-pagination
                    background
                    layout="prev, pager, next"
                    :total="200">
            </el-pagination>
        </div>
    </div>
</template>

<script>
    import EnterpriseAside from '@/pages/enterprise-center/components/EnterpriseAside.vue'
    import HeaderTitle from '@/pages/enterprise-center/components/HeaderTitle.vue'

    export default {
        name: "ResumeManage",
        components: {
            EnterpriseAside,
            HeaderTitle
        },
        data() {
            return {
                nanTag: require('@/assets/images/talentsPage/nan.png'),
                nvTag: require('@/assets/images/talentsPage/nv.png'),
                checkedAll: false,
                currentTabName: 0,
                checkList: [],
                tabList: [
                    {
                        name: '收到的简历',
                        num: '0',
                    }, {
                        name: '收到的简历',
                        num: '0',
                    },{
                        name: '收到的简历',
                        num: '0',
                    },{
                        name: '收到的简历',
                        num: '0',
                    },{
                        name: '收到的简历',
                        num: '0',
                    },
                ],
                talentList: [
                    {
                        avatar: require('@/assets/images/talentsPage/avater_nav.png'),
                        name: '黄先生',
                        salary: '5K-10K',
                        detail: {
                            male: '男',
                            age: '28岁',
                            Education: '本科',
                            experience: '3-5年',
                            address: '广州惠州',
                        },
                        important: '小学数学/初中数学/高中数学',
                        applyState: {
                            type: '全职',
                            major: '专业：高等数学',
                            salary: '5K-10K',
                            remarks: '在职，观望有好的机会'
                        },
                        tags: ['能出差','能加班','形象好','气质佳','口才好'],
                        checked: false
                    },{
                        avatar: require('@/assets/images/talentsPage/avater_nv.png'),
                        name: '黄女士',
                        salary: '5K-10K',
                        detail: {
                            male: '女',
                            age: '28岁',
                            Education: '本科',
                            experience: '3-5年',
                            address: '广州惠州'
                        },
                        important: '小学数学/初中数学/高中数学',
                        applyState: {
                            type: '全职',
                            major: '专业：高等数学',
                            salary: '5K-10K',
                            remarks: '在职，观望有好的机会'
                        },
                        tags: ['能出差','能加班','形象好','气质佳','口才好'],
                        checked: false
                    },{
                        avatar: require('@/assets/images/talentsPage/avater_nav.png'),
                        name: '黄先生',
                        salary: '5K-10K',
                        detail: {
                            male: '男',
                            age: '28岁',
                            Education: '本科',
                            experience: '3-5年',
                            address: '广州惠州'
                        },
                        important: '小学数学/初中数学/高中数学',
                        applyState: {
                            type: '全职',
                            major: '专业：高等数学',
                            salary: '5K-10K',
                            remarks: '在职，观望有好的机会'
                        },
                        tags: ['能出差','能加班','形象好','气质佳','口才好'],
                        checked: false
                    },{
                        avatar: require('@/assets/images/talentsPage/avater_nav.png'),
                        name: '黄先生',
                        salary: '5K-10K',
                        detail: {
                            male: '男',
                            age: '28岁',
                            Education: '本科',
                            experience: '3-5年',
                            address: '广州惠州'
                        },
                        important: '小学数学/初中数学/高中数学',
                        applyState: {
                            type: '全职',
                            major: '专业：高等数学',
                            salary: '5K-10K',
                            remarks: '在职，观望有好的机会'
                        },
                        tags: ['能出差','能加班','形象好','气质佳','口才好'],
                        checked: false
                    },{
                        avatar: require('@/assets/images/talentsPage/avater_nav.png'),
                        name: '黄先生',
                        salary: '5K-10K',
                        detail: {
                            male: '男',
                            age: '28岁',
                            Education: '本科',
                            experience: '3-5年',
                            address: '广州惠州'
                        },
                        important: '小学数学/初中数学/高中数学',
                        applyState: {
                            type: '全职',
                            major: '专业：高等数学',
                            salary: '5K-10K',
                            remarks: '在职，观望有好的机会'
                        },
                        tags: ['能出差','能加班','形象好','气质佳','口才好'],
                        checked: false
                    }
                ],
            }
        },
        methods: {
            checkAll() {
                this.talentList.forEach(item => {
                    item.checked = this.checkedAll;
                })
            },
            checkItem() {
                this.checkedAll = this.talentList.every(item=>{return item.checked})
            }
        }
    }
</script>

